#ifndef __MW_CPP_ENEMY_H__
#define __MW_CPP_ENEMY_H__

#include "cocos2d.h"
#include "GlobalResManager.h"
#include "BaseSprite.h"

USING_NS_CC;

class Enemy : public BaseSprite {
private:
    int m_ID;
    int m_enemyType;
    
    int m_speed;
    int m_bulletSpeed;
    int m_HP;
    int m_bulletPowerValue;
    int m_moveType;
    int m_scoreValue;
    int m_zOrder;
    float m_delayTime;
    int m_attackMode;
    int m_hurtColorLife;
    float m_timeTick;
    bool m_flippedY;
public:
    bool m_visible;
    bool m_active;
public:
    Enemy();
    Enemy(EnemyType type);
    ~Enemy();
    bool enemyInit(EnemyType type);
    virtual void update(float dt);
    void shoot(float dt);
    virtual void hurt(int damage=1);
    virtual void destroy();
    virtual Rect collideRect();
    virtual bool isActive();
    
    static void sharedEnemy();
    static Enemy* create(EnemyType type);
    int getMoveType();


    static Enemy* getOrCreateEnemy(EnemyType type);
    static void preSet();
    
};
#endif /* defined(__MW_CPP_ENEMY_H__) */